﻿using System.Collections.Generic;
using JStore.Core.Entities;
using JStore.Data.Daos;

namespace JStore.Tasks
{
	/// <summary>
	///
	/// </summary>
	public class PowersTask
	{
		private readonly PowersDao _powersDao = new PowersDao();

	    public List<Powers> GetListByMenuId(int menuId)
	    {
	        return _powersDao.GetListByMenuId(menuId);
	    }

	    public void Add(Powers info)
	    {
	        _powersDao.Add(info);
	    }

	    public void DeleteByPowerId(int powerId)
	    {
	        _powersDao.DeleteByPowerId(powerId);
	    }

	    public List<Powers> GetAll()
	    {
	        return _powersDao.GetAll();
	    }

	    public Powers Get(string controllerName, string actionName)
	    {
	        return _powersDao.Get(controllerName, actionName);
	    }
	}
}

